package com.syh.jn.scm.infrastructure.repository.model.stock;

import com.syh.core.ddd.infrastructure.repository.model.SuperBusinessModel;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * 仓库出入库记录列表
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "T_STOCK_STOCK_RECORD")
@EqualsAndHashCode(callSuper = true)
public class StockRecordModel extends SuperBusinessModel {
  /**
   * 出入库单号
   */
  @Column(name = "RECORD_ORDER_CODE", columnDefinition = "varchar(50) COMMENT '出入库单号'")
  private String recordOrderCode;
  /**
   * 对应单号
   */
  @Column(name = "ORIGINAL_ORDER_CODE", columnDefinition = "varchar(50) COMMENT '对应订单号'")
  private String originalOrderCode;
  /**
   * 对应单id
   */
  @Column(name = "ORIGINAL_ORDER_ID", columnDefinition = "bigint COMMENT '对应订单id'")
  private Long originalOrderId;
  /**
   * 对应物流单号
   */
  @Column(name = "ORIGINAL_LOGISTICS_CODE", columnDefinition = "varchar(50) COMMENT '对应物流单号'")
  private String originalLogisticsCode;
  /**
   * 对应物流单id
   */
  @Column(name = "ORIGINAL_LOGISTICS_ID", columnDefinition = "bigint COMMENT '对应物流单id'")
  private Long originalLogisticsId;
  /**
   * 出入库类型(1：销售出库 2：销售退货入库 3：采购入库 4：采购退货出库 5：报损出库 6：报溢入库)
   */
  @Column(name = "TYPE", columnDefinition = "smallint COMMENT '出入库类型: 1：销售出库 2：销售退货入库 3：采购入库 4：采购退货出库 5：报损出库 6：报溢入库'")
  private Short type;
  /**
   * 出入库类型(1：出库、2：入库)
   */
  @Column(name = "IN_OUT_TYPE", columnDefinition = "smallint COMMENT '出入库类型 1：出库、2：入库'")
  private Short inOutType;
  /**
   * 数据类型: 1正规操作, 2回滚操作
   */
  @Column(name = "DATA_TYPE", columnDefinition = "smallint COMMENT '数据类型: 1正规操作, 2回滚操作'")
  private Short dataType;
  /**
   * 仓库id
   */
  @Column(name = "STOREHOUSE_ID", columnDefinition = "bigint COMMENT '仓库id'")
  private Long storehouseId;
  /**
   * 操作人id
   */
  @Column(name = "OPERATOR_ID", columnDefinition = "bigint COMMENT '操作人id'")
  private Long operatorId;
  /**
   * 创建日期
   */
  @Column(name = "CREATE_TIME_STAMP", columnDefinition = "bigint COMMENT '创建日期'")
  private Long createTimeStamp;
  /**
   * 业务记录日期
   */
  @Column(name = "RECORD_TIME_STAMP", columnDefinition = "bigint COMMENT '业务记录日期'")
  private Long recordTimeStamp;
  /**
   * 最后修改日期
   */
  @Column(name = "LAST_UPDATE_TIME_STAMP", columnDefinition = "bigint COMMENT '最后修改日期'")
  private Long lastUpdateTimeStamp;
}
